#include "ADT_Infotype.h"
#include "ADT_String.h"
#include "ADT_Tanggal.h"

// {*****SETTER*****}
void SetEmail(infotype * X, char A[100]){
		int i=0;
		for(i=0;i<100;i++)
			GetEmail(*X)[i] = A[i];
		}
void SetNama(infotype * X, char A[100]){
		int i=0;
		for(i=0;i<100;i++)
			GetNama(*X)[i] = A[i];
		}
void SetTanggalLahir(infotype * X, Tanggal A){
		SetTanggal(&GetTanggal(*X), A);
		}
void SetKotaAsal(infotype * X, char A[100]){
		int i=0;
		for(i=0;i<100;i++)
			GetKotaAsal(*X)[i] = A[i];
		}
void SetUNV(infotype * X, char A[100]){
		int i=0;
		for(i=0;i<100;i++)
			GetUNV(*X)[i] = A[i];
		}
void SetSMU(infotype * X, char A[100]){
		int i=0;
		for(i=0;i<100;i++)
			GetSMU(*X)[i] = A[i];
		}
void SetInfotype(infotype * X, infotype Y)
{
	SetEmail(X, GetEmail(Y));
	SetNama(X, GetNama(Y));
	SetTanggalLahir(X, GetTanggal(Y));
	SetKotaAsal(X, GetKotaAsal(Y));
	SetUNV(X, GetUNV(Y));
	SetSMU(X, GetSMU(Y));
}
		
// {*****PREDIKAT*****}
bool IsInfoEqual(infotype A, infotype B){
		return  (IsStringEqual(A.Email, B.Email)) &&
				(IsStringEqual(A.Nama, B.Nama)) &&
				(IsDateEqual(GetTanggal(A), GetTanggal(B))) &&
				(IsStringEqual(A.KotaAsal, B.KotaAsal)) &&
				(IsStringEqual(A.UNV, B.UNV)) &&
				(IsStringEqual(A.SMU, B.SMU));
				}
bool IsNameLess(infotype A, infotype B){
		return (GetNama(A) < GetNama(B));}
bool IsNameMore(infotype A, infotype B){
		return (GetNama(A) > GetNama(B));}

void PrintInfotype(infotype X)
{
	
}
